<?php
/**
 * (commands) 核算采购成本
 */
namespace App\Console\Commands\MonthlyReportCommon;

use App\Logic\MonthlyReportCommon\CheckPurPrice;
use Illuminate\Console\Command;
class PaymentPurPrice extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'payment:pur-price';

    /**
     * The console command description.
     * 产品采购成本核算
     * @var string
     */
    protected $description = 'check pur-price to mp';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $func = $this->choice('choice exe func-item: (in sequential order & dont repeat)', ['_exePurchaseStorage', '_mixRecord', '_mixOrderBasics', '_mixSkuPriceBasics', '_upSkuPriceBasics']);
        if($func){
            CheckPurPrice::exe($func);
            $this->info($func.' exe success!');
        }else{
            $this->error('wrong: choice exe item!');
        }
        die('finish');
    }
}
